package NG::Gen::Users::Auth;
use strict;
use warnings;
use utf8;

use NG::Sys::Cached::DBList;
our @ISA = qw(NG::Sys::Cached::DBList);

sub get_by_auth {
	my $self = shift;
	my $root = shift;
	my $auth_type = shift;
	my $auth_key = shift;
	my ($id,$entry) = $self->find($auth_type,$auth_key);
	if($id){
		return $root->get_by_id($id);
	}else{
		return;
	}
}


1;
